<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@ page import="jp.co.cos.ittrick.channel.model.ChannelModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.CategoryModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChapterModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.PageModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ApplicationModel" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Date" %>
<html lang="ja">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>${applicationModel.applicationName }：IT TRICK</title>
	<meta name="description" content="${applicationModel.description }" />
	<meta name="keywords" content="${applicationModel.keyWordListString}" />
	<link rel="icon" type="image/gif" href="/favicon.png" >
	<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss">
	<link href="/css/reset.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="/css/common.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="/css/index.css" rel="stylesheet" type="text/css" media="screen" />
	<script src="/js/modernizr-1.1.min.js"></script>
</head>
<%
String dateValue = new java.text.SimpleDateFormat( "yyyy", java.util.Locale.US).format(new Date());
%>
<body>

<!---header start-->
	<header id="mainHead">
		<div class="headerCont">
			<span><a href="/">${applicationModel.applicationName }：IT TRICK</a></span>

			<nav class="headNav">
				<ul class="wazoLabslavaLamp" id="wazolabs">
					<li><a class="act" href="/">ホーム</a></li>
					<li><a href="https://plus.google.com/117110339030145503094/about">プロフィール</a></li>
					<li><a href="/Information/rule" rel="nofollow">利用規約</a></li>
					<li><a href="http://it-trick.appspot.com/Information/" rel="nofollow">お問合せ</a></li>
				</ul>
			</nav>
		</div>
	</header>
<!---header end-->

	<div id="pankuzuNav">
		<!-- AdSense -->
		<jsp:include page="/common/adSense/link_728_15.jsp" />
		<!-- /AdSense -->
	</div>

	<!-- contents -->
	<section id="contents" class="clear">
		<div id="contentsHeader">
			<article id="mainTopContent" class="clear">

				<!-- 記事タイトル -->
				<h1>${applicationModel.applicationName } とは</h1>

				<!-- コンテンツ説明 -->
					${applicationModel.contentString }

				<!-- ソーシャルボタン -->
				<jsp:include page="/common/socialBtnList.jsp" />
			</article>

			<div id="mainTopAdvertisement">
				<!-- AdSense -->
				<jsp:include page="/common/adSense/text_image_300_250.jsp" />
				<!-- /AdSense -->
			</div>
		</div>

	<!-- mainContent -->
		<div id="mainContent">
			<%
			List<ChannelModel> channelList = (List<ChannelModel>)request.getAttribute("channelList");
			ApplicationModel applicationModel = (ApplicationModel)request.getAttribute("applicationModel");
			if(channelList.size() > 0) {
			%>
			<div id="features">
				<%
				for(int i=0; i < channelList.size(); i++) {
					ChannelModel channelModel = channelList.get(i);
					if((i + 1)%2 != 0) {
				%>
				<div class="c12">
				<%	}else { %>
				<div class="c22">
				<%	} %>
					<div class="imgleft">
						<img alt="<%=channelModel.getName() %>" height="110" src="https://googledrive.com/host/0B63XrPddV6p_Zl9JWkJNSlRWSDQ/<%=applicationModel.getApplicationId() %>/images/<%=channelModel.getKeyString() %>.png" width="110">
					</div>
					<h3><a href="/<%=channelModel.getKeyString() %>.html"><%=channelModel.getName() %></a></h3>
					<p><%=channelModel.getDescription() %></p>
				</div>
				<%
					if((i + 1)%2 == 0 || (i + 1) == channelList.size()) {
				%>
				<div class="spacer"></div>
				<%	} %>
				<%} %>
			</div>
			<%} %>
		</div>
	<!-- /mainContent -->

		<aside id="join_facebook">
			<h2>Facebookページにご参加ください</h2>
			<div class="content">
				<p>
					IT TRICKのすべてのチャンネルの最新記事は、Facebookページを通じてお知らせしていきます。<br>
					ぜひ、FacebookページでLikeして最新情報をチェックしてください。
				</p>
			</div>
			<div class="facebook sns_widget">
				<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FItTrickSocial&amp;width=1100&amp;height=510&amp;show_faces=true&amp;colorscheme=light&amp;stream=true&amp;show_border=true&amp;header=true" style="border:none; overflow:hidden; width:1100px; height:510px;"></iframe>
			</div>
		</aside>

	</section>
<!-- /contents -->

<!--footer-->
	<footer id="mainFooter" class="clear">
		<div id="footerContents">
			<section id="footerLeftContents">
				<h3>最近の記事</h3>
				<ul>
					<%
					List<PageModel> newPageList = (List<PageModel>)request.getAttribute("pageList");
					for(PageModel newPageModel: newPageList) {
/* 						ChapterModel newChapterModel = newPageModel.getChapterModelRef().getModel();
						ChannelModel newChannelModel = newChapterModel.getCategoryModelRef().getModel().getChannelModelRef().getModel(); */
					%>
					<li class="navi">
						<%=newPageModel.pageUrlString %>
					</li>
					<% } %>
				</ul>
			</section>

			<section id="footerRightContents">
				<jsp:include page="/common/profile.jsp" />

				<!-- AdSense -->
				<jsp:include page="/common/adSense/text_image_300_250.jsp" />
				<!-- /AdSense -->
			</section>
		</div>

		<section id="copyrightBlock">
			<div id="siteList">
				<h4>姉妹サイト</h4>
				<jsp:include page="/common/siteList.jsp" />
			</div>
			<ul id="logos" class="clear">
				<li>
					<a href="http://code.google.com/intl/ja/appengine/" rel="nofollow" TARGET="_blank">
						<img alt="Powered by Google App Engine" src="http://code.google.com/appengine/images/appengine-silver-120x30.gif">
					</a>
				</li>
				<li>
					<a href="http://www.w3.org/html/logo/" rel="nofollow" TARGET="_blank">
						<img src="http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png" width="120" alt="HTML5 Powered with CSS3 / Styling, and Semantics" title="HTML5 Powered with CSS3 / Styling, and Semantics">
					</a>
				</li>
			</ul>
			<p id="copyright">Copyright &copy; <%=dateValue %> it-trick All Rights Reserved</p>
		</section>
	</footer>
<!-- /footer-->

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/ja_JP/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>
